package server

import (
	"data_service/models"
)

// GameService 提供游戏房间相关业务逻辑
// 供 handler 层调用，解耦 handler 与 models
// 只负责业务流程，不直接操作数据库

type GameService struct{}

func NewGameService() *GameService {
	return &GameService{}
}

// CreateGameRoom 创建游戏房间
func (s *GameService) CreateGameRoom(room *models.GameRoom) error {
	return models.CreateGameRoom(room)
}

// GetGameRooms 获取所有游戏房间
func (s *GameService) GetGameRooms() ([]models.GameRoom, error) {
	return models.GetGameRooms()
}

// UpdateGameRoomStatus 更新游戏房间状态
func (s *GameService) UpdateGameRoomStatus(roomID, status string) error {
	return models.UpdateGameRoomStatus(roomID, status)
}
